package com.lkd.mapper;

import com.lkd.dto.RegionDto;
import com.lkd.entity.Region;
import com.lkd.vo.RegionVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.DeleteMapping;

import java.util.List;

@Mapper
public interface RegionMapper {
    List<RegionVo> fandList(String name);

    Boolean add(RegionDto dto);

    Boolean update(RegionDto dto);

    @Select("select * from tb_region where id = #{id}")
    Region findById(Long regionId);

    @Delete("delete from tb_region where id =#{id}")
    Boolean deleteById(Long id);
}
